package com.lanou3g.zjl.chating.home.chatwindow.child;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.lanou3g.zjl.chating.base.BaseFragment;

import java.util.List;

/**
 * Created by dllo on 15/11/30.
 * 表情的适配器
 */
public class ExpressionPagerAdapter extends FragmentPagerAdapter {
    private List<BaseFragment> baseFragments;
    private List<String> expressions;

    public ExpressionPagerAdapter(FragmentManager fm, List<BaseFragment> fragments, List<String> expressions) {
        super(fm);
        this.baseFragments = fragments;
        this.expressions = expressions;
    }

    @Override
    public Fragment getItem(int position) {
        return baseFragments.get(position);
    }

    @Override
    public int getCount() {
        return expressions.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return expressions.get(position);
    }
}
